﻿@{
    Layout = "";
}
@model Nop.Plugin.Payments.PayPalExpress.Models.PaymentInfoModel
@using Nop.Web.Framework;
@{
    string variantInUrl = "text";

    string protocol = "http";
    if (Model.UseHttps)
    {
        protocol = "https";
    }

    string imageUrl = "";

    imageUrl = string.Format("{0}://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" , protocol);
}
@using (Html.BeginRouteForm("Plugin.Payments.PayPalExpress.SubmitButton", FormMethod.Post, new { id = "form-paypalexpresscheckout" }))
{
    <img id="paypalexpresscheckoutimage" alt="PayPay Express Checkout" src="@Html.Raw(imageUrl)" style="margin-right:7px; cursor:pointer;" />
}
<script type="text/javascript">

    $(document).ready(function () {
        $('#paypalexpresscheckoutimage').click(function () {
            $("#form-paypalexpresscheckout").submit();
        });
    });
</script>
